<?php if (!defined('THINK_PATH')) exit(); /*a:3:{s:83:"E:\workplace\project\Sunwm\web/../application/admin\view\service\category_edit.html";i:1508383956;s:75:"E:\workplace\project\Sunwm\web/../application/admin\view\public\header.html";i:1503189484;s:75:"E:\workplace\project\Sunwm\web/../application/admin\view\public\seller.html";i:1508382600;}*/ ?>
<!DOCTYPE html>
<html lang="zh-cn">

	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
		<meta name="renderer" content="webkit">
		<title><?php echo config('sitename'); ?>-<?php echo lang('label')['Login_title']; ?></title>
		<link rel="stylesheet" type="text/css" href="__ROOT__/static/public/css/pintuer.css" />
		<link rel="stylesheet" type="text/css" href="__ROOT__/static/admin/css/admin.css" />
		<script type="text/javascript" src="__ROOT__/static/public/js/jquery.js"></script>
		<script type="text/javascript" src="__ROOT__/static/public/js/pintuer.js"></script>
		<script type="text/javascript" src="__ROOT__/static/admin/js/admin.js"></script>
		<script type="text/javascript" src="__ROOT__/static/public/layer/layer.js"></script>
		<script type="text/javascript" src="__ROOT__/static/public/laydate/laydate.js"></script>
		<script type="text/javascript" src="__ROOT__/static/public/laytpl/laytpl.js"></script>
	</head>

	<body>
	<style>
		html { overflow-x:hidden; }
	</style>
<script>
    var uid = '<?php echo $data['uid']; ?>';
</script>


<form method="post" action="__URL__/category_edit.html?id=<?php echo $data['id']; ?>" enctype="multipart/form-data">
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
            <td>
                <div class="form-group" style="margin-top: 15px">
                    <div class="label">
                        <label></label>
                    </div>
                    <div class="field">&nbsp;&nbsp;
                        <?php echo lang('label')['select']; ?>商户：<select id="uid" name="uid" class="input input-auto">
	<option value="0">请选择</option>
</select>
<script id="uid_list_tpl" type="text/html">
	{{# for(var i = 0, len = d.data.length; i < len; i++){ }}
		<option {{# if(d.data[i].id==uid){}}selected{{#}}} value="{{ d.data[i].id }}">{{ d.data[i].name }}</option>
	{{# } }}
</script>
<script>
	var func = false;
	$('select').click(function(){
		func = true;
	});
	function start_seller(){
        $.getJSON('__URL__/get_seller', {}, function(res){
            if(res.data.length > 0 ){
                var tpl = $("#uid_list_tpl").html();
                laytpl(tpl).render(res, function(render){
                    $("#uid").html('<option value="0">请选择</option>'+render);
                });
            }
        });
	}
    start_seller();
	$('[name=uid]').change(function(){
		uid = $(this).val();
		if(func == true){
			select_uid();
		}
	});
</script>
                    </div>
                </div>
            </td>
        </tr>
        <tbody>
        <tr>
            <td height="140">
                　<img src="<?php echo $data['image']; ?>" style="width:130px;height:130px;margin-top:10px; margin-bottom:10px;">
            </td>
        </tr>
        <tr>
            <td height="35" style="padding-left: 15px"><input type="file" name="image" style="width: 180px;"/></td>
        </tr>
        <tr>
            <td height="35" style="padding-left: 15px"><input type="text" name="title" value="<?php echo $data['title']; ?>" required/>
            </td>
        </tr>
        <tr>
            <td height="35" style="padding-left: 15px"><input type="submit" class="button border-blue editcat"
                                                              style="padding: 3px 8px;"/></td>
        </tr>
        </tbody>
    </table>
</form>
